/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bank.notifications;

import frmwrk.core.AbstractNotification;
import frmwrk.core.Account;
import frmwrk.core.Entry;

/**
 *
 * @author kgergis
 */
public class PersonalNotification extends AbstractNotification  {

    private static PersonalNotification notification = null;
    
    private PersonalNotification(){
        
    }
    @Override
    public boolean isEntryNotified(Account acc, Entry entry) {
        boolean returnResult= false;
        if(entry.getAmount() > 400 || acc.getBalance() < 0){
            returnResult = true;
            System.out.println("E-Mail is sent to person");
        }
        return returnResult;
    }
    
    public static PersonalNotification getInstance(){
        if(notification == null)
            notification = new PersonalNotification();
        return notification;
    }
    
}
